<template>
  <div class="form-item">
    <div class="label">
      {{ label }}
    </div>

    <input
      class="input" placeholder-style="color: #999;" :disabled="disabled"
      :value="value"
      :placeholder="placeholder" @input="handleInput"
    />
  </div>
</template>

<script>
export default {
  name: 'ZeInput',
  props: {
    label: { type: String, default: '' },
    placeholder: { type: String, default: '请输入' },
    disabled: { type: Boolean, default: false },
    value: {},
  },
  methods: {
    handleInput(e) {
      this.$emit('input', e.detail.value)
    },
  },
}
</script>

<style lang="scss" scoped>
.form-item {
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
  padding: 15px 18px 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #F2F2F2;

  .label {
    color: #333333;
  }

  .input {
    text-align: right;
    font-size: 14px;
    line-height: 14px;
    height: 14px;
    min-height: 14px;
  }
}
</style>
